//
//  WBDemoViewController.swift
//  WeiBo
//
//  Created by lihaixing on 2018/12/11.
//  Copyright © 2018年 lihaixing. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        title="第\(navigationController?.childViewControllers.count ?? 0)个"

        // Do any additional setup after loading the view.
    }
    
    @objc func pushNext() {
        let vc=WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}

extension WBDemoViewController{
    
    override func setupUI() {
        super.setupUI()
//        navigationItem.rightBarButtonItem=UIBarButtonItem.init(title: "下一个", style: .plain, target: self, action: #selector(pushNext))
        
        naviItem.rightBarButtonItem=UIBarButtonItem.init(title: "下一个", fontSize: 16, target:self, action: #selector(pushNext))
    }
    
    
    
}
